#include "include/syscall.h"
#include "include/printf.h"
#include "include/kconst.h"
#include "include/vsprintf.h"
#include "include/misc.h"
void assertion_failure(char *exp, char *file,char *base_file, int line)
{
    printf("%cassert(%s) failed: file: %s, base_file: %s, in line: %d",
	       MAG_CH_ASSERT,
	       exp, file, base_file, line);
}

void panic(const char *fmt, ...)
{
    int i;
    char buf[256];
    va_list args = (va_list)((char*)&fmt + 4);
    i = vsprintf(buf, fmt, args);
    printf("%c!!panic!! %s", MAG_CH_PANIC, buf);

    __asm__ __volatile__("ud2");
}